package org.activemonitoring.datastore.web;

import javax.annotation.Resource;

import org.activemonitoring.datastore.dao.DataStoreDao;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("index")
public class MeasuresController {

    @Resource
    private DataStoreDao dataStoreDao;

    @RequestMapping(method = RequestMethod.GET)
    public String show(ModelMap model) {
        model.addAttribute("measures", this.dataStoreDao.getMeasures());
        return "show";
    }
}
